import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/views/Manager.vue'),
      redirect: '/login',
      children: [
        { path: 'person', component: () => import('@/views/manager/Person.vue')},
        { path: 'password', component: () => import('@/views/manager/Password.vue')},
        { path: 'business', component: () => import('@/views/manager/Business.vue')},
        { path: 'user', component: () => import('@/views/manager/User.vue')},
        { path: 'food', component: () => import('@/views/manager/Food.vue')},
        { path: 'book', component: () => import('@/views/manager/Book.vue')},
        { path: 'guide', component: () => import('@/views/manager/Guide.vue')},
        { path: 'video', component: () => import('@/views/manager/Video.vue')},
        { path: 'chat', component: () => import('@/views/manager/Chat.vue')},
        { path: 'community', component: () => import('@/views/manager/Community.vue')},
      ]
    },
    { path: '/login', component: () => import('@/views/Login.vue')},
  ]
})

export default router
